
<div id="addressinputform" style="display:none;" >

    <div id="addressinput">

		<div class="form-horizontal dnnForm">
[<tag type="if" xpath="genxml/hidden/default" testvalue="True" display="{ON}" />]
				<p class="page-header">[<tag type='valueof' resourcekey='General.PrimaryAddress' />]</p>
[<tag type="endif" />]

[<tag type="if" xpath="genxml/hidden/default" testvalue="False" display="{ON}" />]
				<p class="page-header">[<tag type='valueof' resourcekey='General.OptionalAddress' />]</p>
[<tag type="endif" />]
[<tag type="if" xpath="genxml/hidden/default" testvalue="" display="{ON}" />]
				<p class="page-header">[<tag type='valueof' resourcekey='General.OptionalAddress' />]</p>
[<tag type="endif" />]
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblFirstName' />]</label>
				<div class="col-sm-5">
					[<tag id="FirstName" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblLastName' />]</label>
				<div class="col-sm-5">
					[<tag id="LastName" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblPhone' />]</label>
				<div class="col-sm-5">
					[<tag id="Telephone" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.Email' />]</label>
				<div class="col-sm-5">
					[<tag id="Email" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblCompany' />]</label>
				<div class="col-sm-5">
					[<tag id="Company" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblAddress1' />]</label>
				<div class="col-sm-5">
					[<tag id="Unit" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblAddress2' />]</label>
				<div class="col-sm-5">
					[<tag id="Street" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
	    </div>
    </div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblCity' />]</label>
				<div class="col-sm-5">
					[<tag id="City" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
	    </div>
    </div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblPostCode' />]</label>
				<div class="col-sm-5">
					[<tag id="PostalCode" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
    </div>
    </div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblCountry' />]</label>
				<div class="col-sm-5">
					[<tag id="Country" cssclass="form-control" type="countrydropdown" />]
    </div>
	    </div>
			<div class="form-group">
				<label class="col-sm-3 control-label">[<tag type='valueof' resourcekey='General.lblRegion' />]</label>
				<div class="col-sm-5">
					[<tag id="Region" cssclass="form-control" type="textbox" maxlength="150" Text="" />]
    </div>
	    </div>
			<div class="form-group">
				<div class="col-sm-5 col-md-offset-3">
			        [<tag id="cmdUpdateAddress" type="linkbutton" cssclass="btn btn-primary" resourcekey="General.cmdSaveButton" commandname="saveaddress" />]
			        [<tag id="canceleditaddress" type="linkbutton" cssclass="btn btn-default" resourcekey="General.cmdCancelButton" commandname="cancel" />]
    </div>
    </div>
    [<tag id="default" type="hidden" value="" />] <!-- Default flag for DNN profile link: MUST BE INCLUDED IN ADDRESS UPDATE FORM -->
    [<tag id="index" type="hidden" value="" />] <!-- index of address in list for update: MUST BE INCLUDED IN ADDRESS UPDATE FORM -->
    </div>
</div>
	<br>
<div class="clearfix"></div>
	</div>
</div>

</div>

[<tag type="if" function="settings" key="pageactions" testvalue="True" display="{ON}" />]
<div class="row pageactions"><!-- Page actions - also at top -->
	<div class="col-md-12">
		<div class="box">
			<div class="box-content">
				<div class="col-sm-6">
		    	[<tag id="cmdNewAddress" type="linkbutton" cssclass="btn btn-primary" resourcekey="General.cmdAddButton" commandname="newaddress" />]
		    	[<tag id="cmdViewClient" type="linkbutton" resourcekey="Clients.cmdViewClientButton" cssclass="btn btn-default" commandname="viewclient" />]
				</div>
				<div class="col-sm-6 text-right">
					<!-- No language on this page -->
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</div>
[<tag type="endif" />]


<script>
    $(document).ready(function () {

        $("#addressinputform").hide();

        $("#canceleditaddress").click(function () {
            $("#addressinputform").hide();
            $("#addresscards").show();
        });

        //if we have a addressid in the url, the we are editing an address.
        if ('[Url:addressid]' != '') {
            $("#addressinputform").show();
            $("#addresscards").hide();
        }

    });
</script>